package com.hxzy.dto.front;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author wy
 * @Description 商家重新提交资料
 * @Date 2023/4/20 17:13
 * @Version 1.0
 */
@Getter
@Setter
@ToString
public class ShopResubmitDTO {

    @NotNull(message = "id不允许为空")
    private BigDecimal id;

    /**
     * 商家名称
     */
    @NotBlank(message = "商家名称不能为空")
    @Length(min = 1,max = 100,message = "商家名称长度在1-100个字符之间")
    private String name;

    /**
     * 商家地址
     */
    @NotBlank(message = "商家地址不能为空")
    @Length(min = 1,max = 255,message = "商家名称长度在1-255个字符之间")
    private String address;

    /**
     * 联系电话
     */
    @NotBlank(message = "联系电话不能为空")
    private String phone;

    /**
     * 商家图片
     */
    @NotBlank(message = "商家图片不能为空")
    @Length(min = 1,max = 255,message = "商家图片长度在1-255个字符之间")
    private String picture;

    /**
     * 商家位置经度
     */
    @NotNull(message = "经度不允许为空")
    private BigDecimal longitude;

    /**
     * 商家位置纬度
     */
    @NotNull(message = "纬度不允许为空")
    private BigDecimal latitude;

    /**
     * 商家账户
     */
    @NotBlank(message = "商家账户不允许为空")
    @Pattern(regexp = "^0?(13|15|17|18|14|19)[0-9]{9}$",message = "手机号码格式不正确，只支持(13|14|15|17|18|19)开头的")
    private String loginName;


    private static final long serialVersionUID = 1L;
}
